const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    pluginOptions: {

        electronBuilder: {
            customFileProtocol: "./",
            preload: 'src/electronjs/preload.js',
            builderOptions: {
                // extraResources: [
                //     {from: 'public/mediainfo', to: 'mediainfo', "filter": ["**/*"]}
                // ],
                "nsis": {
                    "oneClick": false, // 是否一键安装
                    "allowElevation": true, // 允许请求提升。 如果为false，则用户必须使用提升的权限重新启动安装程序。
                    "allowToChangeInstallationDirectory": true, // 允许修改安装目录
                    // "installerIcon": "./build/icons/aaa.ico",// 安装图标
                    // "uninstallerIcon": "./build/icons/bbb.ico",//卸载图标
                    // "installerHeaderIcon": "./build/icons/aaa.ico", // 安装时头部图标
                    "createDesktopShortcut": true, // 创建桌面图标
                    "createStartMenuShortcut": true,// 创建开始菜单图标
                    "shortcutName": "mkv-batch-remux", // 图标名称
                    // "include": "build/script/installer.nsh", // 包含的自定义nsis脚本
                },
                "mac": {
                    target: 'dmg',
                    "icon": "public/icon.icns",
                },
                "win": {
                    "icon": "public/icons",
                    // "requestedExecutionLevel": "highestAvailable",
                    "target": [
                        {
                            "target": "nsis",
                            "arch": [
                                "x64"
                            ]
                        }
                    ]
                },
                "electronDownload": {
                    "mirror": "https://npm.taobao.org/mirrors/electron/"
                }
            }
        }
    }
})
